<!--
 * @Author: gyc
 * @Date: 2020-06-17 13:47:59
 * @LastEditTime: 2020-08-18 08:54:18
 * @Description: Nuxt测试版
--> 
<template>
  <div class="index-music">
    <h3 v-if="ishow"><Icon type="md-musical-note" color="black" size="18" />音乐推荐</h3>
    <div class="index-music-box" v-if="ishow">
      <nuxt-link :to="'music/'+i" v-for="i in 8" :key="i" class="music-box-link">
        <music-box class="music-box-item"></music-box>
      </nuxt-link>
    </div>
  </div>
</template>

<script>
import musicBox from "@/components/index/indexMusics/musicBox/box";
export default {
  name: "indexMusics",
  props: ["ishow"],
  components: {
    "music-box": musicBox
  }
};
</script>

<style lang="scss" scoped>
@media screen and (max-width: 1100px) {
  .index-music {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
  }
}
@media screen and (min-width: 1100px) {
  .index-music {
    width: 1100px;
  }
}
a:hover {
  color: black;
}
.index-music {
  margin: 20px auto;
  height: 194px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  h3 {
    opacity: 0;
    animation: showMoviesBox 0.6s ease-in-out;
    animation-fill-mode: forwards;
    padding-bottom: 10px;
  }
  .index-music-box {
    display: flex;
    width: 100%;
    height: 160px;
    overflow-y: hidden;
    overflow-x: auto;
    transition: all 0.4s ease-in-out;
    opacity: 0;
    animation: showMoviesBox 0.6s ease-in-out;
    animation-fill-mode: forwards;
    justify-content: space-between;
    align-items: center;
    &::-webkit-scrollbar {
      display: none;
    }
    .music-box-link {
      &:not(:nth-of-type(1)) {
        margin-left: 10px;
      }
    }
  }
}
@keyframes showMoviesBox {
  0% {
    transform: translateY(60px);
    opacity: 0;
  }
  100% {
    transform: translateY(0px);
    opacity: 1;
  }
}
</style>